package org.jeecg.modules.dock.entity.mes.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.jeecg.modules.utils.DockContentUtil;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * MES-WMS发送刻痕退料、叫料请求
 *
 * @author zhoutong
 */
@ApiModel(value = "MES-WMS发送刻痕退料请求", description = "MES-WMS发送刻痕退料请求")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ScoringReturnOrScratchRequestVO extends MesBaseRequestVO {

    @NotBlank
    @NotNull
    @ApiModelProperty("批次号")
    private String batchId;

    @ApiModelProperty("明细")
    private List<Object> detail;

    @NotBlank
    @NotNull
    @ApiModelProperty("物料编码")
    private String materialCode;

    @NotNull
    @ApiModelProperty("重量，单位KG，精度1kg")
    private BigDecimal weight;

    public void setMaterialCode(String materialCode) {
        this.materialCode = DockContentUtil.addZero(materialCode);
    }

}
